package com.wenx.ExceptionTest;

public class Demo {
    public static void main(String[] args) {
        try {
            test();
        } catch (MyException e) {
            System.out.println("e = " + e.getMessage());
        }
    }

    public static void test(){
        int a = 0;
        if(a == 0){
            throw new MyException(1,"a不能等于0");
        }
        System.out.println("*********");
    }
}
